<template>
  <view class="__bdi">
    <button type="default" @click="clickTo">跳转 1</button>
    <button type="default" @click="clickT2">跳转 2</button>
  </view>
</template>

<script>
import { homePageIndex } from "@/api/course.js";
export default {
  data() {
    return {
      params: {},
    };
  },

  onLoad() {
    // this.$u.get(this.$apiConfig.homeUrl).then((res) => {
    //   console.log(res);
    // });
    // 调用getHomePageCourse接口
    // this.$u.api.getHomePageCourse().then((res) => {
    //   console.log(res);
    // });
    homePageIndex().then((res) => {
      console.log(res);
    });
  },

  methods: {
    clickTo() {
      this.$u.route(this.$rConfig.test, this.params);
    },
    clickT2() {
      this.$u.route(this.$rConfig.test2, this.params);
    },
  },
};
</script>

<style lang="scss"></style>
